<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>多个系列</title>
    <style>
      .chart {
        width: 800px;
        height: 400px;
        background-color: #ccc;
      }
    </style>
  </head>
  <body>
    <div class="chart"></div>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.min.js"></script>
    <script>
      const chart = echarts.init(document.querySelector('.chart'));

      const option = {
        title: {
          text: '折线图1',
        },
        xAxis: {
          data: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
        },
        yAxis: {},
        series: [
          {
            type: 'line',
            data: [11, 20, 15, 22, 8, 24, 28],
          },
          {
            type: 'bar',
            data: [15, 21, 16, 23, 10, 15, 22],
          },

          {
            type: 'pie',
            data: [
              {
                name: '很好',
                value: 13
              },
              {
                name: '好',
                value: 10
              },
              {
                name: '一般',
                value: 5
              },
              {
                name: '差',
                value: 4
              }
            ],
            radius: [20, 30],
            center: ['50%', 35]
          }


          // {
          //   type: 'pie',
          //   data: [
          //     {
          //       name: 'aaa',
          //       value: 11,
          //     },
          //     {
          //       name: 'bbb',
          //       value: 22,
          //     },
          //     {
          //       name: 'ccc',
          //       value: 33,
          //     },
          //   ],
          //   // 半径
          //   radius: [0, 30],
          //   // 圆心点坐标
          //   center: ['50%', 35],
          // },
        ],
        grid: {
          left: 10,
          top: 10,
          right: 10,
          bottom: 10,
          containLabel: true
        }
      };

      chart.setOption(option);
    </script>
  </body>
</html>
